package org.example.recursion;

/**
 * @author carol
 */
public class Factorial {
    public static int f(int n){
        if(n == 1 || n == 0){
            return n;
        }
        return n*f(n-1);
    }

    public static void main(String[] args) {
        int f = f(10);
        System.out.println(f);
    }
}
